﻿using nanhua.BookStore.DomainServices;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Auditing;
using Volo.Abp.Domain.Entities;

namespace nanhua.BookStore.Entitys.ProductAggregate
{
    public class Product : AggregateRoot<Guid>, IHasCreationTime
    {
        /// <summary>
        /// 产品编码
        /// </summary>
        public virtual string ProductCode { get; private set; }
        /// <summary>
        /// 产品名称
        /// </summary>
        public virtual string ProductName { get; private set; }
        /// <summary>
        /// 商品价格
        /// </summary>
        public virtual decimal Price { get; private set; }
        /// <summary>
        /// 用户编码
        /// </summary>
        public virtual Guid ProductCategoryCode { get; private set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public virtual DateTime CreationTime { get; private set; }

        protected Product() 
        {
            this.CreationTime = DateTime.Now;
        }
        internal Product(Guid id,string productCode, decimal price,string productName) :base(id)
        {
            this.ProductCode = productCode;
            this.Price = price;
            this.ProductName = productName;
        }


    }
}
